package cn.spring.entity;

public class Greeting {
    //说话的人
    private String person = "Nobody";
    //说话的内容
    private String words = "nothing";


    public Greeting(String person,String words){
        this.person = person;
        this.words = words;
    }
    public Greeting(){ }
    public String getPerson() {
        return person;
    }

    public void setPerson(String person) {
        this.person = person;
    }

    public String getWords() {
        return words;
    }

    public void setWords(String words) {
        this.words = words;
    }
    //说话方法
    public void sayGreeting(){
        System.out.println(person+"说:“"+words+"”");
    }
}
